
var userId;
var chid
window.onload=function (){
    chid =getQuery("id")
}
function send(){
    axios.get("/user/getLoginUser").then(resp=>{
        info=resp.data
      userId = info.id;
        console.log(chid)
        console.log(userId)
        axios.get("/in/add",{
            params:{
                name:$("nameTxt").value,
                content:$("name2Txt").value,
                chid:chid
            }
        }).then(rasp=>{
            console.log(rasp.data)
            if (rasp.data =="ok"){
                location.href="/post.html?id="+chid
            }
        })
    })
}
function quit(){
    location.href="/post.html?id="+chid
}
function reset(){
    $("nameTxt").innerHTML="";
    $("name2Txt").innerHTML="";
}